﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace System.Windows
{
    /// <summary>
    /// Implements a simple moniker for locating an Assembly-based resource.
    /// </summary>
    public class ResourcePath
    {
        private Type    _AssemblyType;
        private string  _AssemblyName;
        private string  _ResourceId;

        /// <summary>
        /// Gets/Sets the runtime type which identifies the assembly in which the resource resides.
        /// </summary>
        public Type AssemblyType
        {
            get { return _AssemblyType; }
            set { _AssemblyType = value; }
        }

        /// <summary>
        /// Gets/Sets the name of the assembly in which the resource resides. Short names are adequate for identification.
        /// <example>
        /// ResourcePath path = new ResourcePath();
        /// path.AssemblyName = "MyCompany.SilverlightTools";
        /// </example>
        /// </summary>
        public string AssemblyName
        {
            get { return _AssemblyName; }
            set { _AssemblyName = value; }
        }

        /// <summary>
        /// Gets/Sets the resource identifier for the resource being identified.
        /// <example>
        /// ResourcePath path = new ResourcePath();
        /// path.AssemblyName = "MyCompany.SilverlightTools";
        /// path.ResourceId = "MyCompany.Resources.MyXamlAsset.xaml";
        /// </example>
        /// </summary>
        public string ResourceId
        {
            get { return _ResourceId; }
            set { _ResourceId = value; }
        }

        /// <summary>
        /// Initializes an instance of the <see cref="ResourcePath"/> object.
        /// </summary>
        /// <param name="assemblyType">Identifies the assembly in which the resource resides using a type from that assembly</param>
        /// <param name="resourceId">Identifies the resource proper</param>
        public ResourcePath(Type assemblyType, string resourceId)
        {
            this.AssemblyType = assemblyType;
            this.ResourceId = resourceId;
        }

        /// <summary>
        /// Initializes an instance of the <see cref="ResourcePath"/> object.
        /// </summary>
        /// <param name="assemblyName">Identifies the assembly in which the resource resides using the short name of that assembly</param>
        /// <param name="resourceId">Identifies the resource proper</param>
        public ResourcePath(string assemblyName, string resourceId)
        {
            this.AssemblyName = assemblyName;
            this.ResourceId = resourceId;
        }

        /// <summary>
        /// Initializes an instance of the <see cref="ResourcePath"/> object.
        /// </summary>
        public ResourcePath()
        {

        }
    }
}
